package com.cyq.stock.controller;

import com.cyq.stock.server.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/stock")
public class StockController {

    @Autowired
    private StockService stockService;

    @PostMapping("/reduct")
    public String reduct(@RequestParam String productId) {
        stockService.reduct(productId);
        return "ok";
    }

}
